package net.lainiao.morethread.Chapter4.demo11;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Created by Administrator on 2017/3/4.
 */
public class RejectedTaskController implements RejectedExecutionHandler {

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println("RejectedExecutionHandler:Runable "+r.toString());
        System.out.println("RejectedExecutionHandler:Executor "+executor.toString());
        System.out.println("RejectedExecutionHandler:Starting "+executor.isTerminating());
        System.out.println("RejectedExecutionHandler:End "+executor.isTerminated());
    }
}
